import Vue from 'vue'
import App from './App.vue'
import router from './router/index.js'
import store from './store/index.js'

import http from "./http.js";

import API from "@/serverapi.js";


import {
    Button,
    Field,
    CellGroup,
    Form,
    Row,
    Col,
    Tabbar,
    TabbarItem,
    Notify,
    Panel,
    Stepper,
    Search,
    Swipe,
    SwipeItem,
    Lazyload,
    Icon,
    Cell,
    Checkbox,
    CheckboxGroup,
    RadioGroup,
    Radio,
    SwipeCell,
    AddressList,
    GoodsActionButton,
    GoodsAction,
    GoodsActionIcon,
    NavBar,
    Toast,
    SubmitBar,
    Card,
    AddressEdit,
    PasswordInput,
    NumberKeyboard,
    Dialog,
    Popup,
    Picker,
    Loading,
    Empty, Tab, Tabs, Uploader,
} from 'vant';

import 'vant/lib/index.css';
import "font-awesome/css/font-awesome.css";

Vue.use(Button).use(Field).use(CellGroup).use(Form).use(Row).use(Col).use(TabbarItem).use(Tabbar).use(Search).use(NavBar).use(Loading)
    .use(SubmitBar).use(Panel).use(Swipe).use(SwipeItem).use(Lazyload).use(Icon).use(Cell).use(GoodsActionButton).use(Dialog)
    .use(GoodsAction).use(GoodsActionIcon).use(Toast).use(Notify).use(Checkbox).use(CheckboxGroup).use(Card).use(Empty).use(Tabs).use(Tab)
    .use(SwipeCell).use(AddressList).use(Stepper).use(AddressEdit).use(PasswordInput).use(NumberKeyboard).use(Popup).use(Picker).use(RadioGroup)
    .use(Radio).use(Uploader)
;
import VueDirectiveImagePreviewer from 'vue-directive-image-previewer';
import 'vue-directive-image-previewer/dist/assets/style.css';

Vue.use(VueDirectiveImagePreviewer, {
    background: {
        color: '#000'
    },
    animate: {
        duration: 300,
        func: "linear"
    },
    cursor: 'pointer',
    maxHeight: "100%"

});

Vue.config.productionTip = false;
Vue.prototype.$axios = http;
Vue.prototype.$toast = Toast;
Vue.prototype.$api = API;
Vue.prototype.$notify = Notify;
Vue.prototype.$dialog = Dialog;


new Vue({
    router,
    store,
    render: h => h(App)
}).$mount('#app');
